<?php
/** @var PostController $this */
/** @var Post $data */
?>
<div class="view">
                    
        <?php if (!empty($data->title)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('title')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->title); ?>
            </div>
        </div>

        <?php endif; ?>
                
        <?php if (!empty($data->content)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('content')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::decode($data->content); ?>
                <?php //echo htmlspecialchars($data->content); ?>
            </div>
        </div>

        <?php endif; ?>
                
        <?php if (!empty($data->status)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('status')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->status); ?>
            </div>
        </div>

        <?php endif; ?>
                
        <?php if (!empty($data->create_time)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('create_time')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->create_time); ?>
            </div>
        </div>

        <?php endif; ?>
                
        <?php if (!empty($data->update_time)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('update_time')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->update_time); ?>
            </div>
        </div>

        <?php endif; ?>
                
        <?php if (!empty($data->parent->title)): ?>
        <div class="field">
            <div class="field_name">
                <b><?php echo CHtml::encode($data->getAttributeLabel('parent_id')); ?>:</b>
            </div>
            <div class="field_value">
                <?php echo CHtml::encode($data->parent->title); ?>
            </div>
        </div>

        <?php endif; ?>
    </div>